home *** CD-ROM | disk | FTP | other *** search
/ Windows 6-Pak - Disc 5 / Windows 6-Pak (InfoMagic) (Disc 5) (1999).ISO / Misc-Programming-Tools / PLDB10-16.exe / data.z / cmdDB.bat next >
Encoding:
DOS Batch File  |  1998-04-16  |  771 b   |  43 lines

  1. @rem = '
  2. @rem        Sets up the command line debugger for the duration of
  3. @rem        this shell session.
  4. @rem
  5. @rem        Michael Smith - ⌐1998 ActiveState Tool Corp.
  6. @rem
  7. @echo off
  8. echo.
  9. echo Modifying PERL5DB environment variable
  10. echo to use command line debugger for this
  11. echo shell session only.
  12. echo.
  13. perl cmddb.bat
  14. echo.
  15. goto setit
  16. @rem = ';
  17.  
  18. begin:
  19.  
  20.     $foundit = 0;
  21.     for(@INC)
  22.     {
  23.         if (-e "$_\\perl5db.pl")
  24.         {
  25.             $foundit = 1;
  26.             print "Found file: $_\\perl5db.pl\n";
  27.             open(FILE, ">SETIT.BAT") || die "Couldn't open file: setit.bat";
  28.             print FILE "SET PERL5DB=BEGIN{require '$_\\perl5db.pl'}";
  29.             close FILE;
  30.             next;
  31.         }
  32.     }
  33.  
  34.     if(!$foundit)
  35.     {
  36.         print "Could not find 'perl5db.pl'\n\n";
  37.     }
  38.  
  39. __END__
  40. :setit
  41. call SETIT.BAT
  42. DEL SETIT.BAT
  43.